package cn.ruituo.common;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author oldliu
 * @since 1.0
 */
public class User implements Serializable {
    private String name,pass;
    /**
     * 表示用户的级别,默认是收银员
     */
    private String role="cashier";

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(name, user.name) &&
                Objects.equals(pass, user.pass);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, pass);
    }
}
